<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>


        //定义数据
        var  name = 'jshand';

        var age = 18;

        let  introduce = '大家好，我是渣渣辉';


        
        function  sayHi(){
            console.log('大家好')
        }


        let  p1 = {
            name:'jshand',
            age:18,
            gender:'男',
            hello:sayHi
        }

        console.log(p1.name)
        console.log(p1.age)
        //
        console.log(p1.hello)
        p1.hello()

        var abc;
        console.log(abc);

        var t1 = 18
        console.log(t1);

        t1 = null;
        console.log(t1);



        //js是 弱类型
        var v1 = 18;
        var v2 = 10
        console.log("v1",v1);
        console.log("v1+v2",v1+v2);

        v1 = 'abcdef';
        console.log("v1",v1);
        console.log("v1+v2",v1+v2);


        //类型判断
         
        console.log("typeof(10) : ",typeof(10))
        console.log("typeof('abcd') : ",typeof('abcd'))


        var num1 = '10';
        var num2 = '20';
        console.log("num1+num2 ",parseInt(num1)+parseInt(num2))



        //   parseFloat
        var vabc = parseInt('abc')
        
        
        //NAN 表示不是数字
        console.log("vabc",vabc)

        console.log("typeof(NaN)",typeof(NaN))





   </script>
</head>
<body>



    

    
</body>
</html>